<?php	
  	/*\
  	 *	Version - oh.framework
  	 *	----------------------
  	 *	name: version
  	 *	sign: 
  	 *	description: manage versioning for oh.framweork
  	\*/

	// Interface function	
	function oh_module_version($tokens) {
		global $oh_object_version;
		return $oh_object_version;
	} 

	// Option file required
	//require_once($oh['path']."/modules/mysql/ezsql/shared/ez_sql_core.php");
	//require_once($oh['path']."/modules/mysql/ezsql/mysql/ez_sql_mysql.php");
	
	// Main class of module
	class oh_class_version {
		public $version;
		function oh_class_version() {		
		}
		function info() {
			echo oh_debug_div_open();
			echo 'oh.framework - rel:('.oh("config.version").')<br>';
			echo 'powered by info.francescobianco - email:info.francescobianco@gmail.com<br>';
			echo '<a href="http://oh.openplanning.net/">official web site</a>';
			echo oh_debug_pre_open();			
			$ms = oh()->list_modules();
			foreach ($ms as $m){
				$info = oh("kernel")->module_get_info($m);
				if (!$info["error"]) {
					echo '<div><strong>'.$m.'</strong> - <em style="color:#0000a2;">'.$info['description'].'</em></div>';	
				} else {
					echo '<div><strong>'.$m.'</strong> - <em style="color:#d20000;">'.$info['error'].'</em></div>';						
				}
			}
			echo oh_debug_pre_close();			
			echo oh_debug_div_close();
		}
	}
	
	// Main object of module
	global $oh_object_version;
	$oh_object_version = new oh_class_version();
	$oh_object_version->interface = new oh_interface();
?>
